<!-- 模板 -->
<template>
  <!-- 课程信息,路由传值来的 -->
  <div class="detail">
    <div class="course-des">
      <div class="tit">{{ courseDes.desTit }}</div>
      <div class="content">{{ courseDes.desContent }}</div>
      <div class="courseData">
        <div class="co-time">共{{ courseDes.totalCoTime }}课时</div>
        <span>|</span>
        <div class="population">已有{{ courseDes.population }}人学过</div>
      </div>
    </div>
  </div>
</template>
<script>
// import request from '../utils/request.js'

export default {
  name: '',
  data() {
    return {
      courseDes: '',
    }
  },
  components: {},
  computed: {},
  filters: {},
  methods: {
    outPut() {
      this.$emit('index1')
    },
    getRouterInfo() {
      let info = this.$route.query.courseDes
      if (!info) {
        this.courseDes = {
          desTit: '四六级英语火箭班',
          desContent: '精准定位数学解析真题常考语法,名师逐个分析考点，科学有效备考。',
          totalCoTime: 26,
          population: 4681,
          grade: 4.9,
        }
      } else {
        this.courseDes = info
      }
    },
  },
  created() {},
  mounted() {
    this.getRouterInfo(), this.outPut()
  },
}
</script>
<style lang="less" scoped>
// @import url(); 引入公共css类
.detail {
  padding: 0.24rem 0.2rem;
  display: flex;
  width: 100%;
  align-items: center;
  .course-des {
    padding-right: 1.1rem;
    width: 88%;
    .tit {
      font-size: 0.32rem;
      color: #333;
    }
    .content {
      padding-top: 0.1rem;
      font-size: 0.28rem;
      color: #666;
    }
    .courseData {
      padding-top: 0.1rem;
      width: 100%;
      display: flex;
      color: #999;
      font-size: 0.24rem;
      .co-time {
      }
      span {
        width: 0.28rem;
        text-align: center;
      }
      .population {
      }
    }
  }
}
</style>
